package com.nbot.server.service.impl;

import com.nbot.server.domain.SRPFaultWithBLOBs;
import com.nbot.server.domain.SRPResultWithBLOBs;
import com.nbot.server.mapper.third.SRPFaultMapper;
import com.nbot.server.mapper.third.SRPResultMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.nbot.server.mapper.master.OilwellMapper;
import com.nbot.server.domain.OilwellDO;
import com.nbot.server.service.OilwellService;



@Service
public class OilwellServiceImpl implements OilwellService {
	@Autowired
	private OilwellMapper oilwellMapper;

	@Autowired
	private SRPResultMapper srpResultMapper;

    @Autowired
    private SRPFaultMapper srpFaultMapper;
	
	@Override
	public OilwellDO get(Long autoid){
		return oilwellMapper.get(autoid);
	}
	
	@Override
	public List<OilwellDO> list(Map<String, Object> map){
		return oilwellMapper.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return oilwellMapper.count(map);
	}
	
	@Override
	public int save(OilwellDO oilwell){
		return oilwellMapper.save(oilwell);
	}
	
	@Override
	public int update(OilwellDO oilwell){
		return oilwellMapper.update(oilwell);
	}
	
	@Override
	public int remove(Long autoid){
		return oilwellMapper.remove(autoid);
	}
	
	@Override
	public int batchRemove(Long[] autoids){
		return oilwellMapper.batchRemove(autoids);
	}

	@Override
	public List<OilwellDO> listAll() {
		return oilwellMapper.listAll();
	}

	@Override
	public List<SRPResultWithBLOBs> getTagWellList(String tableName, String wellName) {
		return srpResultMapper.selectByWellName(tableName,wellName);
	}

	@Override
	public List<SRPFaultWithBLOBs> getFaultList() {
		return srpFaultMapper.getFaultList();
	}

	@Override
    public SRPFaultWithBLOBs getOilAlarm(String faultName){
		return srpFaultMapper.getOilAlarm(faultName);
	}

}
